Replace deprecated Jamf Pro API endpoints with supported alternatives#79
Open
cr3ation wants to merge 2 commits intomacadmins:mainfrom
Open
Replace deprecated Jamf Pro API endpoints with supported alternatives#79cr3ation wants to merge 2 commits intomacadmins:mainfrom
cr3ation wants to merge 2 commits intomacadmins:mainfrom
Conversation
- Add v3 computer inventory methods (get_computer_inventory_v3, get_computer_v3, get_computer_inventory_detail_v3, update_computer_v3, delete_computer_v3) to replace deprecated v1 endpoint (2025-06-30) - Add send_mdm_command_v2() with ~25 new command models to replace the preview MDM endpoint removed from the API schema - Add upload_package_v1() for direct multipart file upload, replacing the deprecated JCDS v1 S3-based workflow (2025-08-28) without requiring boto3 - Add upload_package() to JCDS2 client using the new upload endpoint - Add HrefResponse model, v3 api_options (sections/sort/filter fields) - Add cfBundleShortVersionString and cfBundleVersion to ComputerApplication - Mark deprecated methods with DeprecationWarning (v1 inventory, JCDS v1, preview MDM commands) - Fix typo in api_options: "serAndLocation.buildingId" → "userAndLocation.buildingId" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- test_models_pro_computers.py: ComputerApplication v1/v3 parsing, roundtrip, Computer model with/without plugins/fonts, extra fields - test_models_pro_mdm.py: all v2 MDM command models, MdmCommandRequest construction/serialization/parsing, CustomCommand, SettingsCommand extra fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces deprecated Jamf Pro API endpoints with their supported alternatives, targeting Jamf Pro 11.25.0. All existing methods are preserved with
DeprecationWarningnotices, and new methods are added alongside them. No breaking changes.GET /v1/computers-inventory(deprecated 2025-06-30) withGET /v3/computers-inventoryPOST /preview/mdm/commands(removed from API schema) withPOST /v2/mdm/commandsPOST /v1/packages/{id}/uploadserAndLocation.buildingId→userAndLocation.buildingIdcfBundleShortVersionStringandcfBundleVersionfields toComputerApplicationDeprecation warnings
Calling any deprecated method will emit a
DeprecationWarningpointing to the replacement:Migration examples
Computer Inventory: v1 → v3
MDM Commands: preview → v2
Package Upload: JCDS v1 (S3/boto3) → direct upload
Files changed
src/jamf_pro_sdk/models/pro/api_options.pysrc/jamf_pro_sdk/models/pro/computers.pycfBundleShortVersionString/cfBundleVersiontoComputerApplicationsrc/jamf_pro_sdk/models/pro/mdm.pyMdmCommandRequestsrc/jamf_pro_sdk/models/pro/__init__.pyHrefResponsemodelsrc/jamf_pro_sdk/clients/pro_api/__init__.pyupload_package_v1,send_mdm_command_v2, deprecation warningssrc/jamf_pro_sdk/clients/jcds2.pyupload_package(), deprecateupload_file()tests/unit/models/test_models_pro_computers.pytests/unit/models/test_models_pro_mdm.pyTest plan
pytest tests/unit/ -v)upload_package_v1